package net.jwtools.tmt.ui.util;

import javax.swing.AbstractButton;
import javax.swing.UIManager;
import javax.swing.plaf.ButtonUI;

import org.springframework.richclient.command.AbstractCommand;
import org.springframework.richclient.command.config.CommandFaceDescriptor;
import org.springframework.richclient.command.config.DefaultCommandButtonConfigurer;

public class JTaskPaneCommandButtonConfigurer extends
		DefaultCommandButtonConfigurer {
	   /*
     * (non-Javadoc)
     * @see org.springframework.richclient.command.config.DefaultCommandButtonConfigurer#configure(javax.swing.AbstractButton,
     *      org.springframework.richclient.command.AbstractCommand,
     *      org.springframework.richclient.command.config.CommandFaceDescriptor)
     */
    public void configure(AbstractButton button, AbstractCommand command, CommandFaceDescriptor faceDescriptor) {
        super.configure(button, command, faceDescriptor);
        try {
            button.setUI((ButtonUI) Class.forName((String) UIManager.get("TaskPaneUI")).newInstance());
        }
        catch (Exception e) {
        }
    }
}
